<?

exec('/usr/sbin/repquota -vpaC | grep "^'.$name.' "', $out, $return);

if( isset($out[0]) AND is_array($out)) {
    list($null,$null,$bused,$bsoft,$bhard,$bgrace,$fused,$fsoft,$fhard,$fgrace) = preg_split("/[\s]+/",$out[0]);
}
else {
    list($null,$null,$bused,$bsoft,$bhard,$bgrace,$fused,$fsoft,$fhard,$fgrace) = 0;
}

echo "<table class=framed ".help('quota').">";
echo "<tr><td colspan=2 class=tbhead>Lagringsgränser hemkatalog</td></tr>";

echo '<tr><td>Använt utrymme:</td><td>'.number_format($bused/1024).' MB</td></tr>';
//echo '<tr><td>Mjuk gräns:</td><td><input name="bsoft" size=4 value="'.number_format($bsoft/1024,'','','').'"> MB</td></tr>';
//echo '<tr><td>Hård gräns:</td><td><input name="bhard" size=4 value="'.number_format($bhard/1024,'','','').'"> MB</td></tr>';
echo '<tr><td>Gränsvärde:</td><td><input name="bhard" size=4 value="'.number_format($bhard/1024,0,'','').'"> MB</td></tr>';

echo "</table>";
?>
